package com.hy.convenient.common;

/**
 * @Description 获取热更新表名
 * @className TableName
 * @Author hdy
 * @Date 2021-1-6 10:23
 * @Version 1.0
 */
public enum TableNameEnum {
    /**
     * 商品表
     */
    BMZX_SPB(1, "商品表","BMZX_SPB"),
    /**
     * 类别表
     */
    BMZX_LBB(2, "类别表","BMZX_LBB"),
    /**
     * 收银机表
     */
    QTSY_SYJB(3, "收银机表","QTSY_SYJB"),
    /**
     * 会员卡等级
     */
    KHZX_HYKDJ(4, "会员卡等级","KHZX_HYKDJ"),
    /**
     * 促销主表
     */
    QTSY_PLAN(5, "促销主表","QTSY_PLAN"),
    /**
     * 促销明细
     */
    QTSY_PLAN_MX(6, "促销明细","QTSY_PLAN_MX"),
    /**
     * 促销辅表
     */
    QTSY_PLAN_FB(7, "促销辅表","QTSY_PLAN_FB"),
    /**
     * 促销礼券类型表
     */
    QTSY_LJLXB(8, "促销礼券类型表","QTSY_LJLXB"),
    /**
     * 返利标准
     */
    QTSY_PLAN_FLBZ(9, "返利标准","QTSY_PLAN_FLBZ"),
    /**
     * 多条码表
     */
    BMZX_DTMB(10, "多条码表","BMZX_DTMB"),
    /**
     * 用户表
     */
    SYSTEM_USER(11, "用户表","SYSTEM_USER"),
    /**
     * 商户"
     */
    SYSTEM_MER(12, "商户","SYSTEM_MER"),
    /**
     * 小票模板
     */
    INVOICE(13, "小票模板","INVOICE"),
    /**
     * 用户权限表
     */
    SYSTEM_USER_SYYLIMIT(14, "用户权限表","SYSTEM_USER_SYYLIMIT"),
    /**
     * 收银机收银参数
     */
    QTSY_SYJCS_MODAL_CODE(15, "收银机收银参数","QTSY_SYJCS_MODAL_CODE"),
    /**
     * 付款方式
     */
    QTSY_FKFS(16, "付款方式","QTSY_FKFS"),
    /**
     * 仓位表
     */
    BMZX_CWB(17, "仓位表","BMZX_CWB"),
    /**
     * 厂商表
     */
    BMZX_CSB(18, "厂商表","BMZX_CSB"),
    /**
     * 促销集合明细表
     */
    QTSY_CXJHMXB(19, "促销集合明细表","QTSY_CXJHMXB"),
    /**
     * 一下QTSY_FKFSMX QTSY_XSMX
     */
    QTSY_FKFSMX(20, "付款方式明细","QTSY_FKFSMX"),

    QTSY_XSMX(21, "销售明细","QTSY_XSMX");

    private int val;
    private String name;
    private String tableName;

    public int getVal() {
        return val;
    }


    public String getName() {
        return name;
    }

    public String getTableName() {
        return tableName;
    }

    TableNameEnum(int val, String name,String tableName) {
        this.val = val;
        this.name = name;
        this.tableName=tableName;
    }

    /**
     * 根据传进来的值获取对应枚举
     *
     * @param value
     * @return
     */
    public static TableNameEnum valueOf(int value) {
        for (TableNameEnum vip : TableNameEnum.values()) {
            if (vip.getVal() == value) {
                return vip;
            }
        }
        return null;
    }


}
